/**
 * 
 */
package com.block.common.security.service.factory;


import com.block.common.security.service.AppSignMannerService;
import com.block.common.security.service.sign.DefaultSignEncryptService;

import java.util.HashMap;
import java.util.Map;


/**
 * 
 * 签名处理工厂
 */
public class SignFactory {

	//是否验签
	/**
	 * 验签
	 */
	public static final String IS_SIGN = "1";

	/**
	 * 【app签名方式】MAP
	 */
	private static Map<String, AppSignMannerService> appSignMannerMap = null;
	static 
	{
		appSignMannerMap = new HashMap<String, AppSignMannerService>();

//		appSignMannerMap.put(XHY_SIGN, new XHYSignEncryptService());

	}
	
	/**
	 * 获得【app签名方式处理】
	 * @param type
	 * @return
	 */
	public static AppSignMannerService getAppSignManner(String type)
	{
		AppSignMannerService appSignMannerService = appSignMannerMap.get(type);
		if(appSignMannerService==null)
		{
			return new DefaultSignEncryptService();
		}
		return appSignMannerService;
	}
	
}
